<?php include '../nav.php';
	
	$cid =$_GET['cid'];
	// 根据当前的分类id  查询子分类path中含有当前分类的id  的id
	$sql = 'select id from category where path like "%'.$cid.'%"';

	// echo $sql;
	$cate_id = query($sql);
	$cate_str = '';
	// foreach($cate_id as $v){
	// 	$cate_str .= $v['id'].',';
	// }

	$cate_str = rtrim($cate_str,',');	

	$sql ='select i.icon, g.name, g.desc, g.price, g.sales, g.id
		   from goods g, goodsImg i
		   where g.id =i.gid and g.cid in ('.$cate_str.')and up =1 and face =1
		   ';
		   // echo $sql; exit;

	$goods_list = query($sql);

 ?>
	<link rel="stylesheet" href="<?= CSS?>list.css">
	<link rel="stylesheet" href="<?= PUB_CSS?>commond.css">	
	<div class='list'>
		<div class='hr-20'></div>

		<div class='list-name'>
		<a href="">首页 </a><a>&nbsp;&nbsp;&gt;&nbsp;&nbsp;手机</a><span>&nbsp;&nbsp;&gt;&nbsp;&nbsp;荣耀</span>
			<div class='list-box'>
				<div class='list-cate clear'>
					<b>分类&nbsp;:&nbsp;&nbsp;</b>
					<a href="">全部&nbsp;&nbsp;荣耀&nbsp;&nbsp;华为畅玩&nbsp;&nbsp;华为Mate/p系类&nbsp;&nbsp;华为G/Y&nbsp;&nbsp;运营商合约</a>
				</div>
				<div class='list-cate2'>
					<b>网络制式&nbsp;:&nbsp;&nbsp;</b>
					<a href="">全部&nbsp;&nbsp;全网通版&nbsp;&nbsp;移动/联通双4G版&nbsp;&nbsp;移动4G版&nbsp;&nbsp;联通4G版&nbsp;&nbsp;电信4G版</a>
				</div>
				<div class='list-cate3'>
					<b>屏幕尺寸&nbsp;:&nbsp;&nbsp;</b>
					<a href="">全部&nbsp;&nbsp;7.0英寸&nbsp;&nbsp;6.8英寸&nbsp;&nbsp;6.6英寸&nbsp;&nbsp;6.0英寸&nbsp;&nbsp;5.7英寸&nbsp;&nbsp;5.5英寸&nbsp;&nbsp;5.2英寸&nbsp;&nbsp;5.0英寸</a>
				</div>
				<div class='list-cate4'>
					<b>排序&nbsp;:&nbsp;&nbsp;</b>
					<a href="">默认&nbsp;&nbsp;价格&nbsp;&nbsp;评价数&nbsp;&nbsp;上架时间</a>
				</div>


		<ul class='ul clear'>

			<li class='list-li  clear'>
				<div class='list-k clear'>
					<p><a href="goods.php?id=<?= $v['id']?>"><img class='img' src="<?= img_url($v=['icon'],240)?>" alt="" width='240px'></a></p>
					<p class='k1'><a href="goods.php?id=<?= $v['id']?>"><?= $v['name']?></a></p>
					<br>
					<p class='jg1'>¥<?= $v['price']?></p>
					<div class='p-botton'>
						<div class='xg'><a href="">选购</a></div>
	 					<div class='pj'><a href="">1000条评价</a></div>

					</div>
				</div>
				
			</li>
		</ul>


			</div>
		</div>
	</div>


<?php include '../foot.php' ?>